<?php
/**
 * @desc 分页小工具
 * @author kevin.wang
 * @date 2015-01-01 12:00:00
 */
class panelBar extends CWidget
{
	//参数配置
	//前台显示个数列表
	private $_showNum = array(20,50,100,200,300);
	//默认显示条数
	//private $_numPerPage = 20;
	//分页显示个数
	private $_pageNumShown = 10;
	//传入参数
	public $currentPage;
	public $total;
	public $numPerPage;
    public function init()
    {
    }
 
    public function run()
    {
        $this->render('panelBar', array(
				'showNum' => $this->_showNum,
				'currentPage' => $this->currentPage,
				'total' => $this->total,
				'numPerPage' => empty($this->numPerPage)?Yii::app()->params['numPerPage']:$this->numPerPage,
				'pageNumShown' => $this->_pageNumShown
			));
    }
}